<!DOCTYPE html>

<html lang="en" data-content_root="../../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>Deployment to hosting provider &#8212; Pytch  documentation</title>
    <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
    <link rel="stylesheet" type="text/css" href="../../_static/classic.css?v=36340f97" />
    <link rel="stylesheet" type="text/css" href="../../_static/css/pytch-classic.css?v=0321735e" />
    
    <script src="../../_static/documentation_options.js?v=7f41d439"></script>
    <script src="../../_static/doctools.js?v=9bcbadda"></script>
    <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
    
    <link rel="icon" href="../../_static/favicon.ico"/>
    <link rel="author" title="About these documents" href="../../about.html" />
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="Source and build information" href="../../source-build.html" />
    <link rel="prev" title="Making a beta or release commit" href="committing-for-beta-or-release.html" /> 
  </head><body>
<div class="NavBar">
  <a href="../../../app/"><h1>Pytch</h1></a>
  <ul>
    <a href="https://pytch.scss.tcd.ie/"><li>About Pytch</li></a>
    <a href="../../index.html"><li>Help</li></a>
    <a href="../../../app/tutorials/"><li>Tutorials</li></a>
    <a href="../../../app/my-projects/"><li>My projects</li></a>
  </ul>
</div>
<div class="warning-work-in-progress">
  <p>These help pages are incomplete — we are working on it!</p>
</div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="deployment-to-hosting-provider">
<span id="deploying-to-hosting"></span><h1>Deployment to hosting provider<a class="headerlink" href="#deployment-to-hosting-provider" title="Link to this heading">¶</a></h1>
<p>The resulting zipfile can be <code class="docutils literal notranslate"><span class="pre">scp</span></code>’d to the hosting provider and
unzipped there.</p>
<section id="redirecting-to-latest-beta">
<h2>Redirecting to latest beta<a class="headerlink" href="#redirecting-to-latest-beta" title="Link to this heading">¶</a></h2>
<p>For cleaner links, we have a redirect in place from <code class="docutils literal notranslate"><span class="pre">latest</span></code> to the
current beta deployment.  Currently this is done manually.  There is
an <code class="docutils literal notranslate"><span class="pre">.htaccess</span></code> file in the hosted <code class="docutils literal notranslate"><span class="pre">beta/</span></code> directory:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">RewriteEngine</span>   <span class="n">on</span>
<span class="n">RewriteBase</span>     <span class="s2">&quot;/beta/&quot;</span>
<span class="n">RewriteRule</span>     <span class="s2">&quot;^latest/?$&quot;</span>  <span class="s2">&quot;build-gSHA/app/&quot;</span>  <span class="p">[</span><span class="n">R</span><span class="p">,</span><span class="n">L</span><span class="p">]</span>
</pre></div>
</div>
<p>which can be updated after unzipping the deployment bundle.  In future
this mechanism will be automated or superseded.</p>
</section>
<section id="redirecting-to-current-release">
<h2>Redirecting to current release<a class="headerlink" href="#redirecting-to-current-release" title="Link to this heading">¶</a></h2>
<p>A release zipfile contains a file</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>releases/X.Y.Z/toplevel-dot-htaccess
</pre></div>
</div>
<p>ready to be used as a top-level <code class="docutils literal notranslate"><span class="pre">.htaccess</span></code> file.  This is copied
manually on the host, to keep a human in the loop for final
deployment.  This mechanism also allows rolling back to a previous
release by re-copying an earlier release’s htaccess file.</p>
</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper"><ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../webapp/user/index.html">Using the Pytch web app</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../vm/user/index.html">Writing Pytch programs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../about.html">About Pytch</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../contact.html">Contact</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../developer.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../developer/development-setup.html">Development setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../developer/design-overview.html">Design overview</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../vm/developer/index.html">VM</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../webapp/developer/index.html">Webapp</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../medialib/developer/index.html">Media library</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../developer/index.html">Website</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Tools</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../index.html#tutorial-compiler-and-related-tools">Tutorial compiler and related tools</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#assembly-of-website-bundle">Assembly of website bundle</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../source-build.html">Source and build information</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../releases/changelog.html">Changelog</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../legal/index.html">Legal information</a></li>
</ul>
<div class="docs-home-link"><hr>
  <ul>
    <li>
      <a href="../../index.html">Pytch help home</a>
    <li>
  </ul>
</div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
  </body>
</html>